package com.xuzz.study.spring.factorybean;

import org.springframework.beans.factory.FactoryBean;

public class PersonFactoryBean implements FactoryBean<Person> {
    @Override
    public Person getObject() throws Exception {
        return new Person();
    }

    @Override
    public Class<?> getObjectType() {

        System.out.println("你通过FactoryBean的getBean获取真正的对象");return Person.class;
    }

    @Override
    public String toString() {
        return "我是FactoryBean这个特殊的bean....:"+super.toString();
    }
}
